QuickOPC User's Guide and Reference
Topic Write with RTD Server
Product Options > Excel Option > Excel Option Fundamentals > Connectivity RTD Server Fundamentals > Topic Write with RTD Server
In This Topic

You can write values from Excel back to an OPC server too. This is usually done by appending a source cell reference to the list of RTD function arguments.  

The RTD function in this mode works like normally, but in addition, it writes the value from the referenced cell into the data source (OPC server). The write occurs every time whenever the RTD function is evaluated (at the beginning, when explicitly invoked, or whenever its parameters change).

Use the Topic Write feature carefully.

This feature is basically a "trick", it uses the RTD function of Excel for something it was not designed for. As such, it has its risks and limitations.

One issue comes from the fact that the RTD function is evaluated anew (and therefore, a Write occurs) not only when the value to be written changes, but also initially - for example, when the worksheet with the RTD function is opened. If you use the Topic Write feature of the RTD server, your overall design must be such that this kind of behavior does not cause a problem.

Friendly Topic Syntax

In order to use the Topic Write feature, add the following sequence of topics to the end of the normal sequence, as described in Topic Syntax.

   valueToWrite [, writeParameter1, writeParameter2, ... [, inputElementPath]]

Note that if there are optional arguments at the end of the original topic sequence, before the Topic Write arguments (for a particular point type and parameters, or for the result value selector), all such parameters must be given first (i.e. cannot be left out). In Excel, you can simply use commas to indicate their presence; the actual values (empty strings) are not necessary, though.

XML Topic Syntax

The XML topic syntax is capable to fully describe the write parameters. It is currently not documented, and is subject to change.

Examples

The following formula in Excel continuously displays values of the boiler level setpoint item. At the same time, any initial and new value from the cell A2 is written to the setpoint item.

   =RTD("conn.rtd", , "da", "OPCLabs.KitServer.2", "Boilers.Boiler #1.LC1001.SetPoint", , "Value;""""", A2)
See Also